#pragma once

#include "socketudp.h"
#include "FileSystem.h"

#include "peernet_def.h"

class CPeerNet
{
public:
	CPeerNet(void);
	~CPeerNet(void);

public:
	static CPeerNet*	s_pEngine;
	CSockDatagram*		m_pSocket;

	DWORD				m_dwMainTask;

public:
	BOOL				StartPeerTask( DWORD dwTaskID );
	BOOL				StartPeerNetService( WORD port );
	void				Finalize();

	//long				SendPeerMsg( SOCKADDR_IN& addr, CMsg* pMsg );
	//BOOL				GetPeerNetSockAddr( SOCKADDR_IN& addr );

public:
	static CPeerNet*	GetEngine() { return s_pEngine; }
};
